const path=require('path')
const resolve=dir=>path.join(__dirname,dir)

module.exports = {
  //   关闭ESlint
  lintOnSave: false,

  // 配置src别名@
  chainWebpack: config => {
    config.resolve.alias
      .set("@", resolve("src"))
      .set("assets", resolve("src/assets"))
      .set("components", resolve("src/components"))
      .set("base", resolve("baseConfig"))
      .set("public", resolve("public"));
  },

  // 代理跨域
  devServer:{
    proxy:{
      '/api':{ //只要路径出现api就用代理
        // target:'http://39.98.123.211',
        target:'http://gmall-h5-api.atguigu.cn',
        // pathRewrite:{'^/api'}
      }
    }
  }
}
